<?php $__env->startSection('content'); ?>
    <div class="page-container">
        <div class="mt-20">
            <table class="table table-border table-bordered table-bg table-hover table-sort">
                <thead>
                <tr class="text-c">
                    <th width="80">渠道名称</th>
                    <th width="80">渠道ID</th>
                    <th width="120">操作</th>
                </tr>
                </thead>
                <tbody>
                <?php if(!empty($lists)): ?>
                    <?php $__currentLoopData = $lists; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $list): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr class="text-c">
                            <td class="text-l"><?php echo e($list->channel_name); ?></td>
                            <td><?php echo e($list->unique_id); ?></td>
                            <td>

                                <a href="<?php echo e(config('web.cnd_url') . '/nonPublicVersion/gamePackage/' . $list->id); ?>">下载</a>
                                <a style="text-decoration:none" class="ml-5"
                                   onClick="deleteChannel('<?php echo e($list->id); ?>')" href="javascript:;" title="删除">删除</a>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php endif; ?>
                </tbody>
            </table>
            <div id="page"  class="r" style="margin-top: 20px;"></div>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
    <script type="application/javascript">
        laypage({
            cont: $('#page'), //容器。值支持id名、原生dom对象，jquery对象。【如该容器为】：&lt;div id="page1">&lt;/div>
            pages: '<?php echo e($lists->totalPage); ?>', //通过后台拿到的总页数
            curr: '<?php echo e($lists->currentPage()); ?>', //初始化当前页
            last:'<?php echo e($lists->lastPage()); ?>',
            jump:function (e,first) {
                if (!first){
                    window.location.href = '<?php echo e($lists->url . '?page='); ?>' + e.curr;
                }
            }
        })
        function deleteChannel (id) {
            var index = layer.confirm('确认删除吗？', {
                btn: ['确认','取消'] //按钮
            }, function(){
                request('/nonPublicVersion/gamePackage/'+id,function (data) {
                    location.replace(location.href)
                },{},'DELETE');
            });
        }

        function edit(id) {

        }
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>